# coding=utf-8
"""
Time:2024/11/7 16:44
"""
'''
封装一个公共的登陆方法
'''
import sys
sys.path.append('..')
from utiles.handle_conf import conf
from utiles.handle_requests import Send_Requests

class Cms_login():

    def login(self):
        request = Send_Requests()
        url = conf.get_value('env','url') + "/cms/manage/loginJump.do"
        data = {
            "userAccount":conf.get_value('test_data','username'),
            "loginPwd":conf.get_value("test_data",'pwd')
        }
        headers = eval(conf.get_value('env','headers'))
        response = request.send(method="post",url=url,data=data,headers=headers)
        return request